Hi, string szProgramName = "C:\\Program Files\\Adobe\\Reader 9.0\\Reader\\AcroRd32.exe" string szPdfName = "S:\\DXL_Development\\Help.pdf" string szCommand = szProgramName " " szPdfName "" system( szCommand )
SystemAdmin - Wed Apr 27 03:49:07 EDT 2011 |
Re: Launching a pdf
You can use: reg query "HKCU\Software\Adobe\Acrobat Reader" /s | findstr InstallPath
string result = ""
win32SystemWait_ ("cmd.exe /C reg query \"HKCU\\Software\\Adobe\\Acrobat Reader\" /s | findstr InstallPath", result, -1)
// strip whitespaces at the end
int p = (length result)-1; while (isspace(result[p])) p--
print "Reading: '" result[0:p] "' \n"
print "Install Path: " getRegistry(result[0:p],"")
Reading: 'HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\InstallPath' Install Path: C:\Programme\Adobe\Reader 9.0\Reader
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Launching a pdf
by the way, you can probably start your PDF directly without calling acrobat reader provided you can double click on it, i.e. Acrobat Reader is associated with PDF. For this just run:
system("cmd /C start c:\\temp\\x.pdf")
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Launching a pdf Mathias Mamsch - Wed Apr 27 05:14:34 EDT 2011
by the way, you can probably start your PDF directly without calling acrobat reader provided you can double click on it, i.e. Acrobat Reader is associated with PDF. For this just run:
system("cmd /C start c:\\temp\\x.pdf")
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Thanks, that works fine Best regards, Paul |